package org.springblade.modules.admin.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tenant.annotation.TenantIgnore;
import org.springblade.modules.admin.entity.MaintainPart;
import org.springblade.modules.admin.mapper.MaintainPartMapper;
import org.springblade.modules.admin.service.IMaintainPartService;
import org.springblade.modules.admin.vo.MaintainPartVO;
import org.springblade.modules.admin.vo.erp.service.BuyingLeadsVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/5/11 8:40
 */
@Service
public class MaintainPartServiceImpl extends BaseServiceImpl<MaintainPartMapper,MaintainPart> implements IMaintainPartService {
	@Override
	public IPage<MaintainPartVO> selectMaintainPartPage(IPage<MaintainPartVO> page, MaintainPartVO maintainPart) {
		return page.setRecords(baseMapper.selectMaintainPartPage(page, maintainPart));
	}

	@Override
	@TenantIgnore
	public BuyingLeadsVO selectBuyingLeadsByPlanId(Long planId) {
		return baseMapper.selectBuyingLeadsByPlanId(planId);
	}

	@Override
	@TenantIgnore
	public List<BuyingLeadsVO> selectBuyingLeadsListByPlanId(Long planId, String tenantId) {
		return baseMapper.selectBuyingLeadsListByPlanId(planId, tenantId);
	}
}
